package com.ruoyi.system.domain.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.eic.framework.core.annotation.InsertTime;
import com.eic.framework.core.annotation.InsertUser;
import com.eic.framework.core.annotation.UpdateTime;
import com.eic.framework.core.annotation.UpdateUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户信息对象 sys_user
 *
 * @author 尹国春
 * @date 2022-07-21
 */
@ApiModel("用户信息对象")
@TableName("sys_user")
public class SysUser implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** $column.fullColumnComment */
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "user_id",type = IdType.ASSIGN_ID)
    private String userId;

    /** 部门ID */
    @Excel(name = "部门ID")
    @ApiModelProperty(value = "部门ID")
    @TableField("dept_id")
    private String deptId;

    /** 用户账号 */
    @Excel(name = "用户账号")
    @ApiModelProperty(value = "用户账号")
    @TableField("user_name")
    private String userName;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    @ApiModelProperty(value = "用户昵称")
    @TableField("nick_name")
    private String nickName;

    /** 用户类型（00系统用户） */
    @ApiModelProperty(value = "用户类型（00系统用户）")
    @TableField("user_type")
    private String userType;

    /** 用户邮箱 */
    @Excel(name = "用户邮箱")
    @ApiModelProperty(value = "用户邮箱")
    @TableField("email")
    private String email;

    /** 手机号码 */
    @Excel(name = "手机号码")
    @ApiModelProperty(value = "手机号码")
    @TableField("phonenumber")
    private String phonenumber;

    /** 用户性别（0男 1女 2未知） */
    @ApiModelProperty(value = "用户性别（0男 1女 2未知）")
    @TableField("sex")
    private String sex;

    /** 头像地址 */
    @Excel(name = "头像地址")
    @ApiModelProperty(value = "头像地址")
    @TableField("avatar")
    private String avatar;

    /** 帐号状态（0正常 1停用） */
    @ApiModelProperty(value = "帐号状态（0正常 1停用）")
    @TableField("status")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    @ApiModelProperty(hidden = true)
    @TableField("del_flag")
    @JsonIgnore
    @TableLogic
    private String delFlag;

    /** 创建者 */
    @ApiModelProperty(hidden = true)
    @TableField("create_by")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @InsertUser
    private String createBy;

    /** 创建时间 */
    @ApiModelProperty(hidden = true)
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @InsertTime
    private Date createTime;

    /** 更新者 */
    @ApiModelProperty(hidden = true)
    @TableField("update_by")
    @UpdateUser
    private String updateBy;

    /** 更新时间 */
    @ApiModelProperty(hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    @UpdateTime
    private Date updateTime;

    /** 备注 */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    public SysUser setUserId(String userId)
    {
        this.userId = userId;
        return this;
    }
    public String getUserId()
    {
        return userId;
    }
    public SysUser setDeptId(String deptId)
    {
        this.deptId = deptId;
        return this;
    }
    public String getDeptId()
    {
        return deptId;
    }
    public SysUser setUserName(String userName)
    {
        this.userName = userName;
        return this;
    }
    public String getUserName()
    {
        return userName;
    }
    public SysUser setNickName(String nickName)
    {
        this.nickName = nickName;
        return this;
    }
    public String getNickName()
    {
        return nickName;
    }
    public SysUser setUserType(String userType)
    {
        this.userType = userType;
        return this;
    }
    public String getUserType()
    {
        return userType;
    }
    public SysUser setEmail(String email)
    {
        this.email = email;
        return this;
    }
    public String getEmail()
    {
        return email;
    }
    public SysUser setPhonenumber(String phonenumber)
    {
        this.phonenumber = phonenumber;
        return this;
    }
    public String getPhonenumber()
    {
        return phonenumber;
    }
    public SysUser setSex(String sex)
    {
        this.sex = sex;
        return this;
    }
    public String getSex()
    {
        return sex;
    }
    public SysUser setAvatar(String avatar)
    {
        this.avatar = avatar;
        return this;
    }
    public String getAvatar()
    {
        return avatar;
    }
    public SysUser setStatus(String status)
    {
        this.status = status;
        return this;
    }
    public String getStatus()
    {
        return status;
    }
    public SysUser setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
        return this;
    }
    public String getDelFlag()
    {
        return delFlag;
    }
    public SysUser setCreateBy(String createBy)
    {
        this.createBy = createBy;
        return this;
    }
    public String getCreateBy()
    {
        return createBy;
    }
    public SysUser setCreateTime(Date createTime)
    {
        this.createTime = createTime;
        return this;
    }
    public Date getCreateTime()
    {
        return createTime;
    }
    public SysUser setUpdateBy(String updateBy)
    {
        this.updateBy = updateBy;
        return this;
    }
    public String getUpdateBy()
    {
        return updateBy;
    }
    public SysUser setUpdateTime(Date updateTime)
    {
        this.updateTime = updateTime;
        return this;
    }
    public Date getUpdateTime()
    {
        return updateTime;
    }
    public SysUser setRemark(String remark)
    {
        this.remark = remark;
        return this;
    }
    public String getRemark()
    {
        return remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.SHORT_PREFIX_STYLE)
                .append("userId", getUserId())
                .append("deptId", getDeptId())
                .append("userName", getUserName())
                .append("nickName", getNickName())
                .append("userType", getUserType())
                .append("email", getEmail())
                .append("phonenumber", getPhonenumber())
                .append("sex", getSex())
                .append("avatar", getAvatar())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
